<html>
<!--
Copyright 2011 Google Inc. All Rights Reserved.

Use of this source code is governed by the Apache License, Version 2.0.
See the COPYING file for details.
-->
  <head>
    <script src="/scripts/analytics.js" type="text/javascript">
    </script>
  </head>
  <body>
    <script type="text/javascript" src="/scripts/client_script.js"></script>
    <h1>Test adding tests.</h1>
    <form name="suiteInfo" action="/suite/add" method="post">
      <table>
        <tr>
          <td>Suite Name:</td>
          <td><input type="text" name="suiteName" id="suiteName"></td>
        </tr>
        <tr>
          <td>Project Name:</td>
          <td><input type="text" name="projectName" id="projectName"></td>
        </tr>
        <tr>
          <td>Description:</td>
          <td><input type="text" name="description" id="description"></td>
        </tr>
        <tr>
          <td>Tokens:</td>
          <td><input type="text" name="suiteTokens" id="suiteTokens"></td>
        </tr>
        <tr>
          <td>Interval:</td>
          <td><input type="text" name="suiteInterval" id="suiteInterval"></td>
        </tr>
        <tr>
          <td>Num of tests to be generated: </td>
          <td><input type="text" name="numOfTests" id="numOfTests"><div id="confirmDiv"></div></td>
        </tr>
      </table>
      <input type="button" name="generateTests" value="Generate Tests" id="generateTests" onclick="autoGenerateTests(false);">
      <input type="button" value="Add Suite" onclick="addSuiteAndTests();">
    </form>
    <h1>Test deleting tests.</h1>
    <form name="deleteTests" action="/suite/delete_tests" method="get">
      <table>
        <tr>
          <td>Suite Name:</td>
          <td><input type="text" name="suiteName" id="suiteName"></td>
        </tr>
        <tr>
          <td>Project Name:</td>
          <td><input type="text" name="projectName" id="projectName"></td>
        </tr>
      <input type="submit" value="Delete tests">
      </table>
    </form>
    <h1>Test load all suites of a project</h1>
    <table>
      <tr>
        <td>Project Name:</td>
        <td><input type="text" name="projectName2" id="projectName2"></td>
        <td><input type="button" name="loadSuitesBtn" id="loadSuiteBtn" value="load" onclick="loadSuitesOfProject();"></td>
      </tr>
      <tr>
        <td>Select Suite:</td>
        <td><select name="selectSuites" id="selectSuites"></select></td>
        <td><input type="button" name="runSuite" value="Run Suite" onclick="runSuite();"></td>
        <td><input type="button" name="showRuns" value="Show Runs in Suite" onclick="showRuns();"></td>
        <td><input type="text" name="intervalInMin" id="intervalInMin"> mins</td>
        <td><input type="button" name="scheduleSuite" value="Schedule this Suite" onclick="scheduleSuite();"></td>
        <td><input type="button" name="checkScheduledSuite" value="Run Scheduled Suite" onclick="checkScheduledSuite();"></td>
      </tr>
      <tr>
        <td>Select Run:</td>
        <td><select name="selectRuns" id="selectRuns"></select></td>
        <td><input type="button" name="deleteRun" value="Delete Run" onclick="deleteRun();"></td>
        <td><input type="button" name="showTestIds" value="Show Test Ids" onclick="showTestIds();"></td>
        <td><input type="button" name="showPassedNum" value="Show Passed num" onclick="showNumOfSuite('passed');"></td>
        <td><input type="button" name="showFailedNum" value="Show Failed num" onclick="showNumOfSuite('failed');"></td>
      </tr>
    </table>
    <h1>Test fetch a random job.</h1>
    <table>
      <tr>
        <td>Tokens:</td>
        <td><input type="text" name="tokens" id="tokens"></td>
        <td><input type="text" name="numOfResults" id="numOfResults" value="1"></td>
        <td><input type="button" name="fetchJob" id="fetchJob" value="fetch" onclick="fetchJobs();"></td>
      </tr>
    </table>
  </body>
</html>
